import { createApp } from 'vue'
import App from './App.vue'

import router from './router'

import * as ElementPlusIconsVue from '@element-plus/icons-vue'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
//导入svg图标
import 'virtual:svg-icons-register'
//导入pinia
import pinia from './store'
// 引入全局样式
import '@/assets/css/common.scss'
// 创建Vue应用实例
const app = createApp(App)
// 全局注册Element Plus图标组件
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
// 使用Element Plus插件并设置中文语言
app.use(ElementPlus, {
    locale: zhCn,
})

// 使用路由并挂载应用到DOM元素#app
app.use(router).use(pinia).mount('#app')


